﻿using System;

using FlurentFiltration.Exceptions;

namespace FlurentFiltration
{
    internal static class ExceptionHelper
    {
        public static BindingNotDefinedException CreateBindingNotDefinedException(Type key)
        {
            return new BindingNotDefinedException(string.Format("Not defined any filter for collection type {0}", key.FullName));
        }

        public static UnsupportedCollectionTypeException CreateUnsupportedColTypeException(Type fromType, Type toType)
        {
            return new UnsupportedCollectionTypeException(string.Format("Can't cast {0} to {1} please cast collection to correct type manually in filtering method",
                                            fromType.FullName, toType.FullName));
        }

    }
}
